package com.aaa.myexception;

import com.aaa.entity.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;


//异常bean
@ControllerAdvice
public class MyException {
    @ExceptionHandler(ArithmeticException.class)
    public Result error(Exception exception){
        return null;
    }
}
